package cn.stylefeng.guns.modular.api;

import cn.stylefeng.guns.modular.quan.service.CouponReceiveService;
import cn.stylefeng.guns.modular.quan.service.CouponService;
import cn.stylefeng.guns.modular.zhizao.service.ZhizaoBannerService;
import cn.stylefeng.guns.modular.zhizao.service.ZhizaoGoodsService;
import cn.stylefeng.guns.modular.zhizao.service.ZhizaoMenuService;
import cn.stylefeng.roses.core.base.controller.BaseController;
import cn.stylefeng.roses.kernel.model.response.ResponseData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/webapi")
public class ZhizaoApiController extends BaseController {

    @Autowired
    private ZhizaoMenuService zhizaoMenuService;
    @Autowired
    private ZhizaoGoodsService zhizaoGoodsService;
    @Autowired
    private ZhizaoBannerService zhizaoBannerService;

    /**
     * 获取优惠券列表
     * @return
     */
    @RequestMapping(value = "/getzzmenu")
    @ResponseBody
    public ResponseData getzzmenu(){
        return ResponseData.success(zhizaoMenuService.list());
    }

    /**
     * 获取优惠券详情
     * @return
     */
    @RequestMapping(value = "/getzzgoods")
    @ResponseBody
    public ResponseData getzzgoods(){
        return ResponseData.success(zhizaoGoodsService.list());
    }

    /**
     * 领取优惠券
     * @param
     * @return
     */
    @RequestMapping(value = "/getzzbanner")
    @ResponseBody
    public ResponseData getzzbanner(){
        return ResponseData.success(zhizaoBannerService.list());
    }

}
